package spring.scan;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.core.type.filter.TypeFilter;
import spring.annotation.ZhangScan;
import typeFilter.MyTypeFilter;

/**
 * @author zhangyan
 * @version $ Id: MyScan.java, v 0.1 2020/11/9 13:19 zhangyan Exp $
 */
public class MyScan extends ClassPathBeanDefinitionScanner {
	public MyScan(BeanDefinitionRegistry registry) {
		super(registry);
	}

	@Override
	public void addIncludeFilter(TypeFilter includeFilter) {
		super.addIncludeFilter(new AnnotationTypeFilter(ZhangScan.class));
	}
}
